{template 'include/header'}
<script type="text/javascript" src="../addons/tim_welfare/template/mobile/js/echarts.common.min.js" ></script>
<div class="container container-fill">
	<style type="text/css">
	.clearfix:after {content: "";display: block;visibility: hidden;height: 0;clear: both;}
	body{background: #f2f2f2;margin: 0;padding: 0;}
	p{margin: 0;}
	.gy_d1{width: 100%;height: 46px;background: #fff;border-bottom: 1px solid #e7e7e7;position: fixed;top: 0;left: 0;z-index: 10;}
	.gy_d1l_img{width: 24px;float: left;margin-top: 11px;}
	.gy_d1l_spn{line-height: 46px;}
	.gy_d1l{width: 23%;float: left;margin-left: 2%}
	.gy_d1c{width: 50%;float: left;text-align: center;line-height: 46px;}
	.count_d{width:100%;padding:10px 3%;background: #fff;margin: 10px 0;}
	.count_d_p1{font-size: 15px;font-weight: 500;margin-bottom: 6px;}
	.count_d_p2{font-size: 14px;color: #333;line-height: 30px;}
	.count_d_p2 .span1{width: 8px;height: 8px;border-radius: 100%;background: #333;display: block;float: left;margin-top: 11px;margin-right: 8px;}
	.count_d_p2 .span0{display: block;float: left;margin-top: 9px;margin-right: 8px;border-width:6px 0 6px 6px;border-style:solid;border-color:transparent transparent transparent #333;}
	.count_d_p2 .span3{font-size: 16px;color: #c11f25;padding: 0 4px;}
	.count_d_p2 .span4{font-size: 12px;color: #666;}
	.count_d_d1{margin: 10px auto;text-align: center;}
	</style>
</head>
<body>
<div class="gy_d1">
	<div class="gy_d1l" onClick="javascript:history.back(-1);"><img class="gy_d1l_img" src="<?php echo MODULE_URL;?>/template/mobile/img/gy_l.png"><span class="gy_d1l_spn">返回</span></div>
	<div class="gy_d1c">捐赠统计</div>
	<div class="clearfix"></div>
</div>
<div style="height:40px;"></div> 
<div class="count_d">
	<p class="count_d_p1">捐赠数据统计</p>
	<p class="count_d_p2" style="border-top:1px dotted #e7e7e7;margin-top:4px;padding-top:4px;">
		<span class="span2">累计金额</span>
		<span class="span3">{php echo round($count['sum'],2);}</span>
		<span class="span4">元</span>
	</p>
	<p class="count_d_p2" style="float:left">
		<span class="span2">发布项目:</span>
		<span class="span3">{$count['pro']}</span>
		<span class="span4">个</span>
	</p>
	<p class="count_d_p2" style="float:left;margin-left:50px;">
		<span class="span2">参与人数:</span>
		<span class="span3">{$count['count']}</span>
		<span class="span4">人</span>
	</p>
	<div class="clearfix"></div>
	
	<div class="count_d_d1">
		<div id="main" style="height:375px;border:1px solid #ccc;padding:10px;"></div>	
	</div>
</div> 
<script>
	var myChart = echarts.init(document.getElementById('main'));	
	option = {
		title: {
			text: '项目捐赠比例',
			left: 'center'
		},
		tooltip : {
			trigger: 'item',
			formatter: "{a} <br/>{b} : {c} ({d}%)"
		},
		legend: {
			bottom: 0,
			left: 'center',
			data: {$data}
		},
		series : [
			{
				type: 'pie',
				radius : '55%',
				center: ['50%', '50%'],
				selectedMode: 'single',
				data:[
					{$str}
				],
				itemStyle: {
					emphasis: {
						shadowBlur: 10,
						shadowOffsetX: 0,
						shadowColor: 'rgba(0, 0, 0, 0.5)'
					}
				}
			}
		]
	};
	myChart.setOption(option);
</script>
</body>
</html>
